package com;

public class SqlExe {
    public static String sqlQuery(int temp) {
    	String sql;
    	switch (temp) {
		case 1:
			//注册用户
			sql = "INSERT into user(name,password,vipcard) VALUES ('"+ RegPage.userName+"','"+RegPage.passwd+"','"+RegPage.cardNumber+"')";
			break;
		case 2:
			//获取会员卡
			sql = "select vipcard from user where name='"+LoginPage.name+"' and password='"+LoginPage.pwd+"'";
			break;
		case 3:
			//登录验证
			sql = "select * from user where name='"+LoginPage.name+"' and password='"+LoginPage.pwd+"'";
			break;
		default:
			sql = "select * from user;";
			break;
		}
		return sql;
	}
}